using System;
using MenesDroid;
using XNA_Game_Engine.FileManagment;


namespace XNA_Game_Engine.Canvas
{
    public static class ActionsHandler 
    {
        public static Core_Engine Game = null;
        public static int level = 0;
        public static int unlockedLevels = 1;
        public static bool showTips = true;
		
		//Variavel Temporaria apenas para o trabalho de topicos
		public static bool UseMouse = false;

        #region Actions
        public static void StartButtonEvent(object sender, EventArgs e)
        {
            Game.LoadLevelSelectionCanvas();
        }        

        public static void ExitButtonEvent(object sender, EventArgs e)
        {
            Game.Exit();
        }

        public static void MainMenuButtonEvent(object sender, EventArgs e)
        {
            Game.LoadMainMenuCanvas();
        }
		
		public static void MouseInputSettingEvent(object sender, EventArgs e)
        {
            UseMouse = true;
        }
		
		public static void KeyboardInputSettingEvent(object sender, EventArgs e)
        {
            UseMouse = false;
        }
       
        #endregion

#region Levels

        public static void ReLoadLevel(object sender, EventArgs e)
        {
            Game.LoadGameCanvas();
        }

        public static void LoadNextLevel(object sender, EventArgs e)
        {
            level++;
            Game.LoadGameCanvas();
        }

        public static void LoadLevel01(object sender, EventArgs e)
        {
            level = 1;
            Game.LoadGameCanvas();
        }

        public static void LoadLevel02(object sender, EventArgs e)
        {
            level = 2;
            Game.LoadGameCanvas();
        }
        public static void LoadLevel03(object sender, EventArgs e)
        {
            level = 3;
            Game.LoadGameCanvas();
        }

        public static void LoadLevel04(object sender, EventArgs e)
        {
            level = 4;
            Game.LoadGameCanvas();
        }

        public static void LoadLevel05(object sender, EventArgs e)
        {
            level = 5;
            Game.LoadGameCanvas();
        }

        public static void LoadLevel06(object sender, EventArgs e)
        {
            level = 6;
            Game.LoadGameCanvas();
        }

        public static void LoadLevel07(object sender, EventArgs e)
        {
            level = 7;
            Game.LoadGameCanvas();
        }

        public static void LoadLevel08(object sender, EventArgs e)
        {
            level = 8;
            Game.LoadGameCanvas();
        }

        public static void LoadLevel09(object sender, EventArgs e)
        {
            level = 9;
            Game.LoadGameCanvas();
        }

        public static void LoadLevel10(object sender, EventArgs e)
        {
            level = 10;
            Game.LoadGameCanvas();
        }        

        public static void UnlockLevel()
        {
            if (level == unlockedLevels)
            {
                unlockedLevels++;
                SaveGameManager.Save();
            }
        }
#endregion
    }
}
